<%@ page language="java"  pageEncoding="UTF-8"%>
<%@include file="/common/jsp/taglibs-nojs-nocss.jsp"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>鼎烜电力集团网络办公平台</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
	</head>
<body>
 <form id="thisForm" action="saveExamineFormula.action" method="post" >
	<table  width="100%" border="0" align="center">
		<tr>
			<td style="width:50%;" align="center">
				请选择考核的公式:
			</td>
	        <td style="width:50%;" align="left">
	        	<input type="hidden" name="examineFormulaVo.userId" value="<s:property value="examineFormulaVo.userId"/>"/>
	        	<input type="hidden" name="examineFormulaVo.id" value="<s:property value="examineFormulaVo.id"/>"/>
	        	<input type="hidden" id="cname" name="examineFormulaVo.memo" value="<s:property value="examineFormulaVo.memo"/>"/>
			 	<select id="formula" name="examineFormulaVo.formula">
               		<option value="[department]*0.5+[myself]*0.2+[equal]*0.3" <s:property value="examineFormulaVo.formula=='[department]*0.5+[myself]*0.2+[equal]*0.3'?'selected=selected':''"/>>个人20%+互评30%+部门评50%</option>
               		<option value="[leadership]*0.5+[myself]*0.2+[equal]*0.3" <s:property value="examineFormulaVo.formula=='[leadership]*0.5+[myself]*0.2+[equal]*0.3'?'selected=selected':''"/>>个人20%+互评30%+领导评50%</option>
               		<option value="[zjl]*0.5+[myself]*0.2+[down]*0.3" <s:property value="examineFormulaVo.formula=='[zjl]*0.5+[myself]*0.2+[down]*0.3'?'selected=selected':''"/>>个人20%+下属评30%+总经理评50%</option>
               		<option value="[department]*0.2+[leadership]*0.3+[myself]*0.2+[equal]*0.3" <s:property value="examineFormulaVo.formula=='[department]*0.2+[leadership]*0.3+[myself]*0.2+[equal]*0.3'?'selected=selected':''"/>>个人20%+互评30%+部门评20%+领导评30%</option>
               		<option value="[zjl]*0.3+[xzrl]*0.2+[myself]*0.2+[down]*0.3" <s:property value="examineFormulaVo.formula=='[zjl]*0.3+[xzrl]*0.2+[myself]*0.2+[down]*0.3'?'selected=selected':''"/>>个人20%+下属评30%+人力评20%+总经理评30%</option>
               	</select>
			 </td>
	 	</tr>
	 	<tr>
			<td style="width:50%;" align="center">
				请选择考核的级别:
			</td>
	        <td style="width:50%;" align="left">
			 	<select name="examineFormulaVo.type">
			 		<option value="1" <s:property value="examineFormulaVo.type==1?'selected=selected':''"/>>普通员工</option>
               		<option value="2" <s:property value="examineFormulaVo.type==2?'selected=selected':''"/>>管理层</option>
               	</select>
			 </td>
	 	</tr>
	 	<tr align="right">
	 		<td colspan="2"><input type="button" id="thisButton" onclick="setFormulaCname();" value="提交" class="btn" onmouseout="this.className='btn'" onmousedown="this.className='btn1'" onmouseover="this.className='btn2'"></td>
	 	</tr>
	 </table>
 </form>
</body>
<script type="text/javascript">
	function setFormulaCname(){
		var formula = document.getElementById("formula");
		document.getElementById("cname").value = formula.options[formula.selectedIndex].text;
	}
/* 表单提交 */
	i.formSubmit("thisButton",	//绑定的按钮id
					  "thisForm" ,   //提交的表单id
					  function(result){
						  	var jsonMsgObj=new JsonMsgObj(result);
							var  msg=jsonMsgObj.getMessage();
						    var codeId=jsonMsgObj.getCodeid();
							var isOk=jsonMsgObj.getIsok();
							if( isOk ){
							    aerouiAlert(msg);
								hideDialog();// 隐藏窗口
								location.reload();
							}else{		// 如果编辑失败了
							  JsManageInfoHandleException( result , function(msg , codeId , isOk){
							  		hideDialog();// 隐藏窗口
							   });
						   }
						});
</script>
</html>